import React, { Component } from "react";
import 'antd/dist/antd.css'
import 'antd-mobile/dist/antd-mobile.css'
import { GlobalStyle } from "./style.js";
import { GlobalFont } from "./static/font/globalFont";
// import store from "./store";
import { Provider } from "react-redux";
import { HashRouter, Switch } from "react-router-dom";
import routes from './route';
import FrontendAuth from './route/promiss.js'
import { PersistGate } from 'redux-persist/integration/react'
import { store, persistor } from './store';
class App extends Component {
  render() {
    return (
      <Provider store={store}>
        <PersistGate  persistor={persistor}>
          <GlobalStyle />
          <GlobalFont />
          <HashRouter>
            <Switch>
              <FrontendAuth routerConfig={routes} {...this.props} />
            </Switch>
          </HashRouter>
        </PersistGate>
      </Provider>
    );
  }
}
export default App;
